package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 用户下单记录表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_user_order_records")
public class UserOrderRecords extends Model<UserOrderRecords> {

    private static final long serialVersionUID = 1L;

    /**
     * 下单记录唯一标识
     */
    @TableId("record_id")
    private Long recordId;
    /**
     * 用户ID（关联用户表）
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 订单ID（关联订单表）
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 下单IP地址
     */
    @TableField("ip_address")
    private String ipAddress;
    /**
     * 下单设备ID
     */
    @TableField("device_id")
    private String deviceId;
    /**
     * 下单时间
     */
    @TableField("created_date")
    private Date createdDate;


    public Long getRecordId() {
        return recordId;
    }

    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    @Override
    public String toString() {
        return "UserOrderRecords{" +
        ", recordId=" + recordId +
        ", userId=" + userId +
        ", orderId=" + orderId +
        ", ipAddress=" + ipAddress +
        ", deviceId=" + deviceId +
        ", createdDate=" + createdDate +
        "}";
    }
}
